﻿using System;
using System.Collections.Generic;
using System.Text;
using CTEM.Controllers.DAO;
using CTEM.Models;

namespace CTEM.Controllers.BUS
{
    class LedgerBUS
    {
        private LedgerDAO _ledgerDAO = new LedgerDAO();
        public long CreateLedger(LedgerDTO dto)
        {
            return _ledgerDAO.CreateLedger(dto);
        }
        public bool updateLedger(LedgerDTO dto)
        {
            return _ledgerDAO.updateLedger(dto);
        }
        public bool delete(long id)
        {
            return _ledgerDAO.delete(id);
        }
        public List<LedgerDTO> LedgerSearch(LedgerDTO param)
        {
            return _ledgerDAO.LedgerSearch(param);
        }
         public List<LedgerDTO> LoadAllLedger()
        {
            return _ledgerDAO.LoadAllLedger();
        }
         public LedgerDTO GetLedgerByID(long ledgerID)
         {
             return _ledgerDAO.GetLedgerByID(ledgerID);
         }
        public long CreateSpendType(SendTypeDTO dto)
        {
            return _ledgerDAO.CreateSpendType(dto);
        }
        public bool UpdateSpendType(SendTypeDTO dto)
        {
            return _ledgerDAO.UpdateSpendType(dto);
        }
        public bool DeleteSpendType(SendTypeDTO dto)
        {
            return _ledgerDAO.DeleteSpendType(dto);
        }
        public List<SendTypeDTO> LoadSendType()
        {
            return _ledgerDAO.LoadSendType();
        }
        public bool loadLergerByKind(long kindID)
        {
            return _ledgerDAO.loadLergerByKindID(kindID);
        }
        public List<LedgerDTO> loadLergerforReport(long kindID,string tyle,DateTime formday, DateTime toDay)
        {
            return _ledgerDAO.loadLergerforReport(kindID, tyle, formday,  toDay);
        }
        public List<LedgerDTO> loadLergerforAllReport(string type, DateTime formday, DateTime toDay)
        {
            return _ledgerDAO.loadLergerforAllReport(type, formday, toDay);
        }

    }
}
